Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Wagtail 6.2 #8522

Merged
merged 14 commits into from
Sep 6, 2024
Merged

Upgrade to Wagtail 6.2 #8522

merged 14 commits into from
Sep 6, 2024

Conversation

willbarton
Copy link
Member

@willbarton willbarton commented Jul 30, 2024

This PR upgrades us to Wagtail 6.2.

There are a few changes worth noting:

Finally, we still have a RemovedInWagtail70Warning: The usage of WidgetWithScript hook is deprecated. Use external scripts instead. warning that will be fixed by wagtail/wagtail-autocomplete#180 when (if?) it gets merged (hopefully before Wagtail 7.0 🤞🏻).

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)

cfgov/cfgov/settings/base.py Outdated Show resolved Hide resolved
cfgov/login/tests/test_viewsets.py Outdated Show resolved Hide resolved
@willbarton willbarton force-pushed the upgrade/wagtail62 branch 4 times, most recently from dc6d70b to 44b0ce4 Compare August 20, 2024 17:42
@willbarton willbarton marked this pull request as ready for review August 20, 2024 17:46
@willbarton willbarton force-pushed the upgrade/wagtail62 branch 2 times, most recently from db3d1e1 to 848c2b8 Compare August 26, 2024 13:53
docs/caching.md Outdated Show resolved Hide resolved
cfgov/v1/signals.py Outdated Show resolved Hide resolved
cfgov/cdntools/backends.py Outdated Show resolved Hide resolved
cfgov/cdntools/tests/\ Outdated Show resolved Hide resolved
cfgov/v1/signals.py Show resolved Hide resolved
"CLIENT_TOKEN": os.environ.get("AKAMAI_CLIENT_TOKEN"),
"CLIENT_SECRET": os.environ.get("AKAMAI_CLIENT_SECRET"),
"ACCESS_TOKEN": os.environ.get("AKAMAI_ACCESS_TOKEN"),
"HOSTNAMES": ["www.consumerfinance.gov"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a problem for beta.consumerfinance.gov, which has its own Akamai configuration?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved this to a variable in base.py for both Akamai and Cloudfront. Will have a corresponding Ansible PR presently.

@willbarton willbarton force-pushed the upgrade/wagtail62 branch 3 times, most recently from 24c6379 to c45079c Compare September 4, 2024 17:58
@willbarton willbarton requested a review from chosak September 4, 2024 18:13
.env_SAMPLE Outdated Show resolved Hide resolved
`WAGTAIL_USER_CREATION_FORM` and `WAGTAIL_USER_EDIT_FORM` are deprecated in favor of subclassing Wagtail's `UserViewSet` class and providing a custom `WagtailUserAppConfig` class that overrides that of `wagtail.users`. See https://docs.wagtail.org/en/latest/releases/6.2.html#deprecation-of-wagtail-user-edit-form-wagtail-user-creation-form-and-wagtail-user-custom-fields-settings

This is... not my favorite bit of Django code, and feels a little anti-idiomatic. Effectively what happens here is that the `LoginUsersAppConfig` that we define (alongside `LoginConfig` — it doesn't work when combined) both allows us to override `user_viewset` and provide our own ***AND*** replaces that of `wagtail.users`, so that `login.apps.LoginUsersAppConfig` masquerades as `wagtail.users` for the sake of Django's app registration. But this is the direction Wagtail has gone for user and group viewset overrides 🤷🏻‍♂️.
A dict of distribution ids for CloudFront is deprecated in Wagtail 6.2. We were only using a dict for a single distribution ID, so this isn't terribly impactful but does require us to change our configuration format slightly.

See https://docs.wagtail.org/en/latest/releases/6.2.html#specifying-a-dict-of-distribution-ids-for-cloudfront-cache-invalidation-is-deprecated

fixy cloud
This change updates our CDN tools, AkamaiBackend, etc, for the Wagtail 6.2 changes in frontend caching. It also moves all our CDN tools and frontend caching to a separate package outside of v1 to isolate the functionality.
Feedback was removed in #7046 and the feedback report was removed in #7159. This removes the `export_feedback` permission and the template used for the feedback report.
Wagtail 6.2 changes reports to  use the new universal listing templates. This necessitates several changes, outlined in the release notes here: https://docs.wagtail.org/en/latest/releases/6.2.html#changes-to-report-views-with-the-new-universal-listings-ui

This change makes all of these required changes to our existing reports and report templates.

In the process, I have also removed the "no-XSLX" base template and option; all our reports are now available as both CSV and XSLX.

fix http
@willbarton willbarton enabled auto-merge September 6, 2024 12:11
@willbarton willbarton added this pull request to the merge queue Sep 6, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 6, 2024
@willbarton willbarton added this pull request to the merge queue Sep 6, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 6, 2024
@willbarton willbarton added this pull request to the merge queue Sep 6, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 6, 2024
@willbarton willbarton added this pull request to the merge queue Sep 6, 2024
Merged via the queue into main with commit 55fe6a7 Sep 6, 2024
17 checks passed
@willbarton willbarton deleted the upgrade/wagtail62 branch September 6, 2024 13:11
willbarton added a commit that referenced this pull request Sep 9, 2024
This change fixes the `invalidate_page_cache` management command after the changes for Wagtail 6.2 in #8522.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants